<script lang="ts" setup>
  import { ref } from "vue"
  import gmDialog from '@/components/Dialog/index.vue'
  import { type FormInstance } from "element-plus"
  import { getUser } from "@/utils/cache/cookies"
  const form = ref<any>(JSON.parse(getUser() || ""))
  const dialogRef = ref<InstanceType<typeof gmDialog>>()
  const formRef = ref<FormInstance>()
  const emit = defineEmits(['cancel'])

  const cancel = () => {
    emit('cancel')
  }
</script>

<template>
  <gm-dialog
    ref="dialogRef"
    title="个人信息"
    :showSubmitBtn="false"
    cancelBtnText="关闭"
    @cancel="cancel">
    <el-form ref="formRef" :model="form" label-width="100px" label-position="left">
      <el-form-item prop="password" label="帐号">
        {{form.username}}
      </el-form-item>
      <el-form-item prop="password" label="手机号码">
        {{form.phone || '-'}}
      </el-form-item>
      <el-form-item prop="password" label="姓名">
        {{form.name}}
      </el-form-item>
      <el-form-item prop="password" label="角色名称">
        {{form.roleName}}
      </el-form-item>
    </el-form>
  </gm-dialog>
</template>


<style lang="scss" scoped>
</style>
